<?php

//弹出警告
function show($status, $message, $data = array())
{
    $reuslt = array(
        'status'  => $status,
        'message' => $message,
        'data'    => $data,
    );
    exit(json_encode($reuslt));
}

//反函数
function br2nl($text)
{
    return preg_replace('/<br\\s*?\/??>/i', '', $text);
}

function array_merge_rec($arr)
{
    $newArr = array();
    foreach ($arr as $key => $val) {
        foreach ($val as $k => $v) {
            $newArr[] = $v;
        }
    }
    return $newArr;
}
